#ifndef _ALGOLINEARCALIB_H_
#define _ALGOLINEARCALIB_H_

#include <stdint.h>
#include "../common_typedef.h"

#define ALGO_LINEAR_CALIB_EN 1

void algoLinearCalib_Init(algoLinearCalib* algo, uint8_t* mem, size_t memLen);
void algoLinearCalib_InsertPoint(algoLinearCalib *caliber, dataPt point);
void algoLinearCalib_SetRange(algoLinearCalib *caliber, dataPt min, dataPt max);
float algoLinearCalib_Calc(const algoLinearCalib *caliber, float val);

#ifdef USING_CLIB_CLI
#include "cli.h"
/* CLI command */
/* 控制台打印参数表 */
void algoLinearCalib_PrintParaTable(char *cmd, int len);
/* 控制台解析参数表 */
void algoLinearCalib_ModifyParaTable(char *cmd, int len);
/* 控制台解析参数表 */
void algoLinearCalib_SaveParaTable(char *cmd, int len);
#endif

#endif //_LINEARCALIB_H_
